<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title></title>
  <link href="./styles/base.css" rel="stylesheet" type="text/css">
  <link href="./js/datepicker/datepicker.css" rel="stylesheet">
  <link href="/questionsAndAnswers/styles/wenda.css" rel="stylesheet">
  <link href="./styles/wendaDetail.css" rel="stylesheet" type="text/css">
  <link href="./js/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
  <link href="/js/plugins/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="./js/jquery.js"></script>
    <script type="text/javascript" charset="utf-8" src="./js/ueditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="./js/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="./js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="/js/plugins/datepicker/datepicker.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script type="text/javascript" src="./js/common.js"></script>
    <script type="text/javascript" src="./js/wendaDetail.js"></script>
  <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>
    <script type="text/javascript" src="/js/system/common.js"></script>

    <script>
        $(function () {
            //提交表单
            $(".btn_submit").click(function () {
                $("#editForm").ajaxSubmit(function (data) {
                    if(data.success){
                        window.location.href = "/questionsAndAnswers/wendaDetail?id="+data.data;
                    }else{
                        popup("操作失败");
                    }
                })
            })

            //顶：点赞
            $(".up_act").click(function () {

                var aid = $(this).data("aid");
                $.get("/answer/answerThumbup", {aid:aid}, function (data) {
                    console.log(data);
                    if(data.success){
                        /*popup("顶成功啦");*/
                        /*$(".topvote12655354").html(data.data.thumbupnum);*/
                        window.location.reload();

                    }else{
                        if(data.code == 102){
                            popup(data.msg);
                        }else{
                            popup("今天你已经顶过了");
                        }

                    }
                });
            })
        })
    </script>
</head>

<body style="position: relative;">
  <#assign currentNav="wenda">
  <#include "../common/navbar.ftl">
  <div class="wrapper">
    <div class="detail-wrap clearfix">
      <div class="col-main">
        <div class="q-detail">
          <div class="q-content">
            <div class="q-title">
              <a href="/wenda/area-10065.html" target="_blank" class="location"><i></i>${(query.dest.name)!}</a>
                <h1>
                  <a href="/wenda/detail-18458675.html">${(query.title)!}</a>
                </h1>
            </div>

            <div class="q-desc">
              ${(queryContent.content)!}
            </div>

           <div class="q-info1 clearfix">

             <div class="q-tags fl">
                <a class="a-tag" href="/wenda/area-10065.html" target="_blank">${(query.dest.name)!}</a>
             </div>

             <div class="pub-bar fr">
               <a href="/wenda/u/43303516/answer.html" class="photo" target="_blank">
                  <img src="${query.author.headImgUrl}"
                        width="16" height="16"></a>
               <a class="name" href="/wenda/u/43303516/answer.html" target="_blank">${(query.author.nickname)!}</a>
                <span class="time"><span>${query.createTime?string('yyyy-MM-dd HH:mm:ss')}</span></span>
              </div>
            </div>

            <div class="q-operate clearfix">
                <div class="fl">
                    <!-- 问题分享 -->
                    <div class="q-share cate-share">
                        <a class="_js_showShare"><i class="q-share-icon"></i>分享</a>
                        <div class="share-pop _j_share_pop hide clearfix" data-title="为什么说在北京通勤等于取经？上下班到底有多苦？"
                             data-qid="18458675">
                            <a title="分享到新浪微博" class="sina _j_do_share" data-site="wb"></a>
                            <a title="分享到QQ空间" class="zone _j_do_share" data-site="qz"></a>
                            <a title="分享到微信" class="weixin _j_do_share_wx" data-site="wx"></a>
                        </div>
                    </div>
                    <!-- 邀请回答 -->
                    <div class="seek-help _j_tip_box">
                        <a class="_j_seek_help_new">邀请蜂蜂回答</a>
                    </div>
                    <!-- 举报 -->
                    <div class="admin_hide tip-off">
                        <a data-japp="report" data-refer="http://www.mafengwo.cn/wenda/detail-18458675.html"
                           data-refer-uid="43303516" data-app="qa.question" data-busi-id="qid:18458675">举报</a>
                    </div>
                </div>

                <div class="fr">

                    <span class="atten-num"><span class="_j_same_num">${(query.follownum)!}</span>人关注</span>

                    <a class="btn-atten _j_same_question " rel="nofollow" data-status="1"><span>关注</span></a>

                    <a href="#huida" class="btn-answer _j_btn_goanswer" rel="nofollow">回答</a>
                </div>
              </div>
            </div>
          </div>

        <div class="answer-wrap">
          <div class="hd">
            <a href="javascript:;" class="view_all">查看全部${(query.replynum)!}个回答</a>
            <div style="display:none;"><span id="_j_anum">${(query.replynum)!}</span>个回答</div>
          </div>

            <form id="searchForm" action="/questionsAndAnswers/wendaDetail" method="get">
                <input type="hidden" name="id" value="${(query.id)!}">
                <input type="hidden" name="currentPage" value="1" id="currentPage">
            </form>


            <div class="bd _j_pager_box">
            <ul class="answer-list answer_detail">
              <div>
                <#list pageInfo.list as a>
                <li>
                  <div class="answer-side _js_answerAva">
                    <!-- <a class="btn-ding _js_zan "><i></i><span data-real_num="3">3</span></a> -->
                  </div>
                  <div class="answer-content _js_answer_content">
                    <div class="answer-info clearfix">
                      <div class="user-bar fl">
                        <a class="_j_filter_click avatar" href="javascript:;" target="_blank"><img
                            src="${(a.author.headImgUrl)!}"
                            width="48" height="48" class="photo"></a>
                        <a class="name" href="javascript:;" target="_blank">${(a.author.nickname)!}</a>
                        <a class="level" href="javascript:;" target="_blank" rel="nofollow">LV.${(a.author.level)!}</a>
                        <a class="identity i-guide" href="javascript:;" target="_blank">指路人</a>

                      </div>
                        <#if a.gold == true >
                          <ul class="answer-medal fr">
                            <li class="gold">
                               <div class="btn"><i></i><a href="javascript:;" target="_blank">金牌回答</a></div>
                            </li>
                          </ul>
                        </#if>

                    </div>
                    <!-- 回答内容 -->
                    <div class="_j_short_answer_item hide" style="display: block;">
                      ${(a.answerContent.content)!}
                    </div>
                      <div class="newcate-bd">
                      <ul><li>
                          <a class="up_act" data-aid="${(a.id)!}">
                              <div class="operate">
                                  <div class="zan" style="float: left;"><i></i><div class="num _j_up_num topvote12655354">${a.thumbupnum!}</div></div>
                              </div>
                          </a>
                      </li></ul>
                  </div>
                  </div>
                </li>
                    <!--<form>.newcate-bd li .operate .zan i
                        <div class="editor-outer _j_editorOuter _js_editorWrap _js_forFixTitle">
                            <textarea></textarea>
                        </div>
                        <div class="aa-ft">
                            <input class="btn-comment _j_submit_answer_btn" type="button" value="回复"/>
                        </div>
                    </form>-->
                </#list>
              </div>
            </ul>
          </div>
              <#include "../common/page.ftl">
            <form id="editForm" action="/answer/saveAnswer" method="get">
                <input type="hidden" name="id" value="${(query.id)!}">
            <div class="bd _j_pager_box">
                <div class="aa-hd">
                  <a class="aa-avatar" href="/wenda/u/53383161/answer.html"><img
                      src="http://n1-q.mafengwo.net/s12/M00/35/98/wKgED1uqIreAU9QZAAAXHQMBZ74008.png?imageMogr2%2Fthumbnail%2F%2148x48r%2Fgravity%2FCenter%2Fcrop%2F%2148x48%2Fquality%2F90"
                      class="photo"></a>
                  <a class="aa-name">${userInfo.nickname!}</a>
                </div>

                <div class="qt-details">
                    <dl class="body cf">
                        <dd id="content_div">
                            <script id="editor" type="text/plain" style="width:100%;height:500px;"></script>
                        </dd>
                    </dl>
                </div>

            <div class="aa-ft">
              <input class="btn-comment _j_submit_answer_btn btn_submit" type="button" value="提交回答"/><a name="huida"></a>
            </div>
            </div>
         </form>
        </div>
      </div>
      <div class="col-side"></div>

    </div>
  </div>
</body>

</html>